Skip to content

feat: SBS - #275

Merged
arifBurakDemiray merged 17 commits into
stagingfrom
sdk-behavior-settings
Oct 22, 2026
Merged

arifBurakDemiray merged 17 commits into
stagingfrom
sdk-behavior-settings

Conversation

@arifBurakDemiray

Copy link
Copy Markdown
Member

No description provided.

@arifBurakDemiray
arifBurakDemiray marked this pull request as draft July 14, 2026 12:26
@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Unit Test Results 🚀

739 tests  +122   739 ✅ +122   2m 49s ⏱️ +44s
 64 suites + 10     0 💤 ±  0 
 64 files   + 10     0 ❌ ±  0 

Results for commit 66a11ce. ± Comparison against base commit fd1081a.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Dependency security scan

Scanned 24 resolved dependencies, failing on HIGH and above.

No known vulnerabilities in 24 resolved dependencies.

Result: passed

Full run log

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Code coverage

module lines branches
sdk-java 89.8% (7233/8054) 80.0% (3202/4000)
sdk-java-ui 69.7% (958/1374) 62.7% (495/790)

Files changed by this pull request

file lines covered
sdk-java/src/main/java/ly/count/sdk/java/Config.java 92.1% (303/329)
sdk-java/src/main/java/ly/count/sdk/java/Countly.java 86.6% (161/186)
sdk-java/src/main/java/ly/count/sdk/java/internal/ConfigurationProvider.java 100.0% (19/19)
sdk-java/src/main/java/ly/count/sdk/java/internal/CountlyTimer.java 79.5% (31/39)
sdk-java/src/main/java/ly/count/sdk/java/internal/CrashImpl.java 90.2% (148/164)
sdk-java/src/main/java/ly/count/sdk/java/internal/DefaultNetworking.java 83.2% (149/179)
sdk-java/src/main/java/ly/count/sdk/java/internal/InternalConfig.java 88.6% (70/79)
sdk-java/src/main/java/ly/count/sdk/java/internal/JsonFileStorage.java 93.1% (81/87)
sdk-java/src/main/java/ly/count/sdk/java/internal/Log.java 94.1% (463/492)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleBackendMode.java 96.2% (303/315)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleBase.java 91.7% (22/24)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleConfiguration.java 95.7% (427/446)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleConnectionTest.java 94.3% (200/212)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleContent.java 88.4% (334/378)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleCrashes.java 85.6% (155/181)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleDeviceIdCore.java 82.5% (118/143)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleEvents.java 94.8% (218/230)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleFeedback.java 81.7% (210/257)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleLocation.java 98.4% (127/129)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleRemoteConfig.java 81.8% (234/286)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleRequests.java 75.9% (132/174)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleSessions.java 87.2% (34/39)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleUserProfile.java 90.1% (336/373)
sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleViews.java 87.3% (315/361)
sdk-java/src/main/java/ly/count/sdk/java/internal/SDKCore.java 89.4% (388/434)
sdk-java/src/main/java/ly/count/sdk/java/internal/SDKStorage.java 84.5% (158/187)
sdk-java/src/main/java/ly/count/sdk/java/internal/SessionImpl.java 90.1% (274/304)
sdk-java/src/main/java/ly/count/sdk/java/internal/Storage.java 71.0% (76/107)
sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java 89.3% (267/299)
sdk-java/src/main/java/ly/count/sdk/java/internal/UserEditorImpl.java 96.6% (115/119)
sdk-java/src/main/java/ly/count/sdk/java/internal/UtilsInternalLimits.java 100.0% (85/85)
sdk-java/src/main/java/ly/count/sdk/java/internal/UtilsListingFilters.java 100.0% (29/29)
Least covered classes (10 shown)
class module lines covered uncovered
ly.count.sdk.java.ui.JavaFxContentDisplay sdk-java-ui 10.6% (23/216) 193
ly.count.sdk.java.ui.FxSurfaces sdk-java-ui 74.8% (172/230) 58
ly.count.sdk.java.ui.ExternalBrowser sdk-java-ui 55.0% (66/120) 54
ly.count.sdk.java.internal.SDKCore sdk-java 89.0% (363/408) 45
ly.count.sdk.java.ui.JavaFxWidgetHost sdk-java-ui 81.2% (190/234) 44
ly.count.sdk.java.internal.ModuleRequests sdk-java 75.9% (132/174) 42
ly.count.sdk.java.internal.ModuleContent sdk-java 89.7% (280/312) 32
ly.count.sdk.java.internal.TimedEvents sdk-java 60.8% (48/79) 31
ly.count.sdk.java.ui.CountlyWebView sdk-java-ui 81.0% (128/158) 30
ly.count.sdk.java.internal.SessionImpl sdk-java 90.1% (274/304) 30

Full run log

The store file was truncated and then written in place on every save, and
the SDK saves it at every init and every settings response. A process
stopped mid-write left a file that made every later Countly.init throw a
JSONException into the application.

Saves now write a temporary file next to the store and move it over the
store, atomically where the file system allows. A store that is not valid
JSON is logged and replaced by empty storage on the next save instead of
failing init, and a temporary file left by an interrupted save is deleted
when the storage opens, so it is not taken for other stored SDK data.
Each response was merged into the stored settings, so a setting removed
in SDK Manager kept its last server value for good, across restarts too: a
removed kill switch, filter, journey trigger, limit or rqs stayed in force.
Each valid response now replaces the stored settings, and a setting it
leaves out goes back to the developer configuration or the SDK default, as
the reference implementation does since its settings merge fix. Values the
validation drops resolve the same way.

A cr false from the server, from storage or from the provided settings no
longer lifts the consent requirement the developer set: the resolved
requirement is the developer's value or a cr true, so the settings can add
the requirement but never remove it.

While a device ID change without merge ends the previous device ID's timed
events and view, a journey trigger or a full event queue reached on that
thread no longer sends the queue under the new device ID; those events go
out together under the previous one, and refresh no content zone.

Tests whose later responses relied on the merge now carry the settings
they need in each response.
arifBurakDemiray and others added 3 commits October 22, 2026 09:07
SBS review fixes: replace stored settings, keep the consent requirement, device ID trigger, store file
# Conflicts:
#	sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java
@arifBurakDemiray
arifBurakDemiray marked this pull request as ready for review October 22, 2026 06:35
… time

- A gathered line needs the consent of the feature its bracket names. A line
  of no feature needs the events and user profiles consents the app enabled,
  and removing a consent drops the held lines of that feature.
- One sdk_logs request waits in the queue at a time, checked against the
  stored request, and a sent batch resumes only a delivery it held back.
- A device ID change without merge queues the held lines and the tail of a
  stopped gather under the old ID and stops the gather. An answer requested
  before that change no longer arms it, while a change with merge keeps it.
- A gather the server stops uploads its last lines once, under its ID.
- The networking decides between a drain and a recheck under one lock, and a
  failing drain still rechecks.
- SessionImpl logs event, location and view data after the feature check.
- The test RSA key is 2048 bits (CodeQL).
…d features

- Every feature getter returns an interface whose calls go to the running
  module and are ignored, with an error to callbacks, until it runs. One kept
  from before init or before a consent change reaches the module later.
- onConsentRemoval stops only the modules of the removed features, and
  removing the location consent erases the location on the server.
- A module built for a consent given after init is active, so unhandled
  crashes are recorded.
- Only the SDK's own [CLY]_ keys are internal events.
- A failing timer run no longer ends its timer, and a failing module no longer
  holds back the others on the same tick.
- Events read the view IDs of the views module that runs now.
- Remote config download callbacks and a content display registered before
  the consent are kept for the module that runs later.
- The deprecated Countly calls and the user editor log no user data before
  the consent check of their feature.
…missing files

- The breadcrumb list is guarded, so one added while a crash is recorded on
  another thread is not lost.
- A refused second init no longer replaces the running SDK's logger.
- A missing storage file is logged at debug level, one that cannot be opened
  as an error.
arifBurakDemiray and others added 4 commits October 22, 2026 18:57
SBS log gathering: per feature consent, one queued batch, device ID change and stopped gather tail
Never null feature interfaces, consent removal of only its features, SDK owned [CLY]_ keys
Breadcrumbs during a crash, the logger on a refused init, missing storage file errors
…them

Two tests waited until a request file was gone, then checked a line that
the SDK logs only after it removes the file: the request drop age test the
line of the request's owner, the backoff test the "not backing off" line of
the last request. On a busy runner the check could run in between and fail,
as the drop age test did on CI with "expected:<1> but was:<0>". Both now
wait for their line with awaitLogs.
arifBurakDemiray and others added 2 commits October 22, 2026 21:31
Wait for the lines logged after a request's removal before asserting them
- String literals come first in comparisons, the probe rows keep a copy
  of their paths, and the connection test module declares its fields
  before its nested classes.
- The names of a FilterList sit in a field that no longer repeats the
  class name.
- The connection test listener is package-private, so its test reads it
  without reflection.
- Tests group the digits of long numeric literals, drop an unused import
  and an empty constructor, and name an ignored exception as such.
- The changelog entry about the feature interfaces wraps onto
  continuation lines.
@arifBurakDemiray
arifBurakDemiray merged commit 64466a0 into staging Oct 22, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants